#ifndef _ML_STAT_TOOLS_H_
#define _ML_STAT_TOOLS_H_
#include "MLCommon.h"
#include "MLDataSet.h"
#include "MLDataPoint.h"
#include "MLDataClustering.h"
#include "MLDistanceFunctions.h"

_MYLABLIB_BEGIN
class CMLTools_Stat
{
public:
	// Constructor and Destructor
	CMLTools_Stat(void);
	~CMLTools_Stat(void);

public:
	// Methods
	static int CalcVariance(const std::vector<double>& vNumber, double& dVariance);
	static CMLDataPoint CalCentroid(const CMLDataSet& dataSet);
	static double CalStandardDeviation(const CMLDataSet& dataSet,
		IMLDataPointDistanceFunc* pDistFunc);
	static double CalSSQ(const std::vector<CMLDataSet>& vClusters, 
		IMLDataPointDistanceFunc* pDistFunc);
	static double CalSSQ(const std::vector<CMLDataCluster>& vClusters, 
		IMLDataPointDistanceFunc* pDistFunc);
	static double CalSSQ(const CMLDataSet& dataSet, const std::vector<CMLDataPoint>& vCenters, 
		IMLDataPointDistanceFunc* pDistFunc);
};

_MYLABLIB_END
#endif
